package com.itheima.CharStream.CharInputStream;

import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;

public class inputDemo {
    public static void main(String[] args) throws IOException {
        //创建字符输入流对象
        FileReader fr1 = new FileReader("day623-24CharStream\\xx.txt");
        //读取数据
                     //一次读取一个字符
        int ch;
        while ((ch=fr1.read())!=-1){
            System.out.println(((char) ch));
        }
        //释放资源
        fr1.close();


    }
}
